use strict;
use warnings;
TEST('kandnw k5, k6, k7', [0xc5,0xcc,0x42,0xef], 'MODE64');

TEST('kandw k5, k6, k7', [0xc5,0xcc,0x41,0xef], 'MODE64');

TEST('kmovw k5, k6                    ', [0xc5,0xf8,0x90,0xee                              ], 'MODE64');
TEST('kmovw k5, word [rcx]            ', [0xc5,0xf8,0x90,0x29                              ], 'MODE64');
TEST('kmovw k5, word [rax+r14*8+0x123]', [0xc4,0xa1,0x78,0x90,0xac,0xf0,0x23,0x01,0x00,0x00], 'MODE64');
TEST('kmovw word [rcx], k5            ', [0xc5,0xf8,0x91,0x29                              ], 'MODE64');
TEST('kmovw word [rax+r14*8+0x123], k5', [0xc4,0xa1,0x78,0x91,0xac,0xf0,0x23,0x01,0x00,0x00], 'MODE64');
TEST('kmovw k5, eax                   ', [0xc5,0xf8,0x92,0xe8                              ], 'MODE64');
TEST('kmovw k5, ebp                   ', [0xc5,0xf8,0x92,0xed                              ], 'MODE64');
TEST('kmovw k5, r13d                  ', [0xc4,0xc1,0x78,0x92,0xed                         ], 'MODE64');
TEST('kmovw eax, k5                   ', [0xc5,0xf8,0x93,0xc5                              ], 'MODE64');
TEST('kmovw ebp, k5                   ', [0xc5,0xf8,0x93,0xed                              ], 'MODE64');
TEST('kmovw r13d, k5                  ', [0xc5,0x78,0x93,0xed                              ], 'MODE64');

TEST('knotw k5, k6', [0xc5,0xf8,0x44,0xee], 'MODE64');

TEST('kortestw k5, k6', [0xc5,0xf8,0x98,0xee], 'MODE64');

TEST('korw k5, k6, k7', [0xc5,0xcc,0x45,0xef], 'MODE64');

TEST('kshiftlw k5, k6, 171', [0xc4,0xe3,0xf9,0x32,0xee,0xab], 'MODE64');
TEST('kshiftlw k5, k6, 123', [0xc4,0xe3,0xf9,0x32,0xee,0x7b], 'MODE64');

TEST('kshiftrw k5, k6, 171', [0xc4,0xe3,0xf9,0x30,0xee,0xab], 'MODE64');
TEST('kshiftrw k5, k6, 123', [0xc4,0xe3,0xf9,0x30,0xee,0x7b], 'MODE64');

TEST('kunpckbw k5, k6, k7', [0xc5,0xcd,0x4b,0xef], 'MODE64');

TEST('kxnorw k5, k6, k7', [0xc5,0xcc,0x46,0xef], 'MODE64');

TEST('kxorw k5, k6, k7', [0xc5,0xcc,0x47,0xef], 'MODE64');

